﻿@using Telerik.Web.Mvc.UI;
@model  Auction.Models.AuctionSearchModel

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}


<head>
  <meta charset="utf-8">
  <title>jQuery UI Datepicker - Display inline</title>
  <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
  <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
  <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
  
  <script>
      $(function () {
          $("#datepicker").datepicker();
      });
  </script>
</head>
<script type="text/javascript">
    $(".t-grid-header").css('display', 'none');
</script>

<div >
    <div id="datepicker"></div>
    <table class="Tablex" align="center" width="100%">
    <tr  class="Tablex">
       
        <td  class="Tablex">
           @(Html.Telerik().Calendar()
        .Name("Calendar")
        .Selection(settings => 
                settings
                    .Action("SelectAction", new { date = "{0}", theme = Request.QueryString["theme"] })
        )
        .Value(ViewData["date"] != null ? (DateTime)ViewData["date"] : DateTime.Today)
)
         
        </td >

        <td  class="Tablex" >
            <table  class="Tablex">
                <tr  class="Tablex">
                    <td>Country: </td>
                    <td  class="Tablex">
                         @Html.DropDownListFor(m => m.Country, new SelectList(Model.ListAuctionCountry,"Country", "Country"),new { style = "width: 250px;" })
                    </td>
                </tr>
                <tr  class="Tablex">
                          <td>Auction House: </td>
                    <td  class="Tablex">
                           @Html.DropDownListFor( m => m.AuctionHouse, new SelectList(Model.ListAuctionHouse,"AuctionHouse", "AuctionHouse"), new { style = "width: 250px;" })
                    </td>
                </tr>
               
                <tr class="Tablex">
                    <td class="Tablex">
                         </br>
                    </td>
                    <td class="Tablex">
                         </br>
                        <button type="submit" >Search</button>
                    </td>
                </tr>
            </table>
          
        
           
        </td>
    </tr>
   
        </table>
<table class="Tablex" align="center" width="100%">
    <tr  class="Tablex">
      <td class="Tablex">
  
  @{
      Html.Telerik().Grid<BusinessLayer.Auction.Models.AuctionModel>()
          .Name("WikiPageGrid2")
          .Columns(columns =>
          {
              columns.Bound(c => c.Country).Title("").HeaderHtmlAttributes(new { style = "display:none;" });

              columns.Bound(c => c.Url).Title("").HeaderHtmlAttributes(new { style = "display:none;" });
              columns.Bound(c => c.AuctionHouse).Title("").HeaderHtmlAttributes(new { style = "display:none;" });
              columns.Bound(c => c.Sno).Hidden(true).HeaderHtmlAttributes(new { style = "display:none;" });
              columns.Bound(c => c.Sno).ClientTemplate("<img alt='<#= Country #>' src='" + Url.Content("~/Images/CountryFlag/") + "<#= Country #>.gif' />").HeaderHtmlAttributes(new { style = "display:none;" }).Width(200);
          })
          .DataKeys(keys =>
          {
              keys.Add(c => c.Sno);
          })
            .ClientRowTemplate(grid =>
                "<table class='Tablex'>"+
                "<tr class='btn-back-ground2'>" +
                 "<td width='400px' colspan='3'  class='Tablex'>" +
                " <div class='chr-result-hd-txt1 '> From <#= Fromdatht #> To <#= Todatht #>  </div> " +
               
                "</td>" +
                "</tr>"+
                "<tr height='150px' class='Tablex'>" +
                "<td width='150px' align='center' class='Tablex'>" +
                "<img class='t-widget' src='" + Url.Content("Images/CountryFlag/") +
                    "<#= Country#>.gif' alt='<#= Country #>' title='<#= Country #>' />" +
                "</td>" +
                "<td width='400px'  class='Tablex'>" +
                " <div class='chr-result-hd-txt'> <#= AuctionHouse #> </div> " +
                " <div class='ProductTable'> From <#= Fromdatht #> To <#= Todatht #>  </div> " +
                 " <div class='chr-sale-lot-link'> <#= Country #> - <#= City #> - <#= AuctionHouse #> </div> " +
                "</td>"+
                "<td width='170px'    class='Tablex'>" +
                "</br><p class='btn-back-ground' ><a href='<#= Url #>' target='_blank' class='btn-back-ground1'>GO TO AUTION ONLINE</a></p></br>" +
                "</td>"+
                "</tr></table>" 
                 )
            .DataBinding(dataBinding => dataBinding.Ajax().Select("GetWikiPages", "Auction"))
           .Footer(false)   
              
          .Render();
          }
          </td>
                </tr>
            </table>
     <style type="text/css">
         .Tablex {
             border-width: 5px;
             border-style: hidden;
         }
         .ProductTable {
             background: none repeat scroll 0 0 rgba(0, 0, 0, 0);
             font-family: Georgia,serif;
             font-style: italic;
             font-weight: normal;
             margin-bottom: 4px;
             padding: 0;
             text-transform: none;
         }
         .chr-result-hd-txt {
             color: #990000;
             font-size: 13px;
             font-weight: bold;
             line-height: 17px;
             text-transform: uppercase;
         }
       
         .chr-sale-lot-link {
             border-left: 0px solid #888888;
             color: #77683B;
             font: 11px/18px 'Georgia',serif;
             padding-left: 0px;
             padding-right: 0px;
             text-transform: uppercase;
         }
         .btn-back-ground {
             background-color: #910E0E;
             font: 11px/11px 'Georgia',serif;
             border-radius: 7px 7px 7px 7px;
         }
         .btn-back-ground2 {
              border-width: 5px;
             border-style: hidden;
             background-color: #e3e5bb;
             border-radius: 7px 7px 7px 7px;
              color: #000000;
             font-size: 14px;
             font-weight: bold;
             line-height: 17px;
             text-transform: uppercase;
         }
         .btn-back-ground1 {
            
             font: 11px/11px 'Georgia',serif;
             color: #FFFFFF !important;
         }
    </style>

</div>